# T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  T i n y s   S u p e r   S i m p l e   E x c e p t i o n   L o g 
 
 # Q%        D e v e l o p e r s   T o o l   S e r i e s 
 
 # Q%  B y   T i n y M i n e 
 
 # Q%
 
 # Q%    F i r s t   P u b l i s h e d / E r s t v e r  f f e n t l i c h t   0 1 . 1 2 . 2 0 1 3 
 
 # Q%
 
 # Q%    V i s i t   :   h t t p : / / r p g m a k e r - v x - a c e . d e /   f o r   f u r t h e r   I n f o r m a t i o n 
 
 # Q%
 
 # Q%    S u g g e s t i o n s ?   S u p p o r t ?   B u g s ?   C o n t a c t   m e   i n   h t t p : / / r p g m a k e r - v x - a c e . d e / 
 
 # Q%
 
 # Q%    C r e d i t s   r e c o m m e n d e d   :   T i n y M i n e 
 
 # Q%    I d e a   b y   :   P a n d a M a r u 
 
 # Q%    
 
 # Q%    C o m m e r c i a l   :   H a v e   f u n   w i t h   i t ! 
 
 # Q%    E d i t a b l e ?   :   I n f o r m   m e ,   i f   y o u   e d i t   t h e   s c r i p t   a n d   d o n ' t   f o r g e t   c r e d i t s .   
 
 # Q%    
 
 # Q%  V e r s i o n   :   1 . 1   / /   1 3 . 1 2 . 2 0 1 3 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 
 
 $ i m p o r t e d   | | =   { } 
 
 $ i m p o r t e d [ : T I N Y _ S S E L ]   =   t r u e 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  * *   F E A T U R E S   * * 
 
 # Q%      
 
 # Q%        S c r i p t   w i l l   c r e a t e   a   t e x t f i l e   i n   y o u r   P r o j e c t   d i r e c t o r y   a n d   w i l l   g a t h e r 
 
 # Q%        a l l   A u d i o   a n d   G r a p h i c   e x c e p t i o n s   i n   t h e   m o s t   s i m p l e   w a y .   N o   e x t r a   E x c e p t i o n s   - 
 
 # Q%        o n l y   p u r e   E r r o r s   w h i c h   b r e a k   u p   t h e   g a m e . 
 
 # Q%    
 
 # Q%        Y o u   c a n   i n s t a l l / d e i n s t a l l   t h e   s c r i p t   d u r i n g   d e v e l o p i n g   p r o c e s s ,   w h e n e v e r   y o u 
 
 # Q%        n e e d   i t . 
 
 # Q%      
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 
 
 m o d u l e   T I N Y   #   D o   n o t   t o u c h 
 
     m o d u l e   E R R O R _ H A N D L E R   #   D o   n o t   t o u c h 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  %  * *   E D I T A B L E   R E G I O N   * *     D e f i n i n g   G e n e r a l   S e t t i n g s       * *   E D I T A B L E   R E G I O N   * * 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
         
 
         #   N a m e   o f   t h e   t e x t f i l e ,   w h i c h   w i l l   c a t c h   y o u r   g r a p h i c / a u d i o   e r r o r s 
 
         L O G _ N A M E   =   ' L o g ' 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  %  * *   E N D   O F   E D I T A B L E   R E G I O N   * *   B E W A R E   * *   E N D   O F   E D I T A B L E   R E G I O N   * *   D O N T !   * * 
 
 # Q%  %  * *                       D o n t   e d i t   b e l o w   t h i s   l i n e ,   e x c e p t . . .   j u s t   d o n ' t                       * * 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
     e n d   #   E R R O R _ H A N D L E R 
 
 e n d   #   T I N Y 
 
 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  %  * *   O L D   C l a s s   B i t m a p 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 c l a s s   B i t m a p 
 
     
 
     a l i a s _ m e t h o d   : i n i t i a l i z e _ e r r o r _ c a t c h e r _ t i n y _ 2 7 7 6       ,                               : i n i t i a l i z e 
 
     
 
     d e f   i n i t i a l i z e ( f i l e n a m e ,   * a r g s ) 
 
         b e g i n 
 
             i n i t i a l i z e _ e r r o r _ c a t c h e r _ t i n y _ 2 7 7 6 ( f i l e n a m e ,   * a r g s )   
 
         r e s c u e   
 
             T I N Y : : E R R O R _ H A N D L E R . e x t r a c t _ p a t h s _ g r a p h i c ( f i l e n a m e ) 
 
             #   P a s s   a n   e m p t y   B i t m a p 
 
             i n i t i a l i z e _ e r r o r _ c a t c h e r _ t i n y _ 2 7 7 6 ( 3 2 ,   3 2 ,   * a r g s )   
 
         e n d 
 
     e n d 
 
     
 
 e n d   #   B i t m a p 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  %  * *   O L D   M o d u l e   A u d i o 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 m o d u l e   A u d i o 
 
     
 
     c l a s s   < <   s e l f 
 
         a l i a s _ m e t h o d   : b g m _ e r r o r _ c a t c h e r _ t i n y _ 2 1 3 4       , : b g m _ p l a y 
 
         a l i a s _ m e t h o d   : s e _ e r r o r _ c a t c h e r _ t i n y _ 2 8 8 4         , : s e _ p l a y 
 
         a l i a s _ m e t h o d   : b g s _ e r r o r _ c a t c h e r _ t i n y _ 7 2 5 2       , : b g s _ p l a y 
 
         a l i a s _ m e t h o d   : m e _ e r r o r _ c a t c h e r _ t i n y _ 9 1 1 2         , : m e _ p l a y 
 
     e n d 
 
     
 
     d e f   s e l f . b g m _ p l a y ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         b e g i n 
 
             b g m _ e r r o r _ c a t c h e r _ t i n y _ 2 1 3 4 ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         r e s c u e 
 
             p a t h   =   f i l e n a m e 
 
             E R R O R _ H A N D L E R . e x t r a c t _ p a t h s _ a u d i o ( p a t h ) 
 
         e n d 
 
     e n d 
 
     
 
     d e f   s e l f . s e _ p l a y ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         b e g i n 
 
             s e _ e r r o r _ c a t c h e r _ t i n y _ 2 8 8 4 ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         r e s c u e 
 
             p a t h   =   f i l e n a m e 
 
             T I N Y : : E R R O R _ H A N D L E R . e x t r a c t _ p a t h s _ a u d i o ( p a t h ) 
 
         e n d 
 
     e n d 
 
     
 
     d e f   s e l f . b g s _ p l a y ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         b e g i n 
 
             b g s _ e r r o r _ c a t c h e r _ t i n y _ 7 2 5 2 ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         r e s c u e 
 
             p a t h   =   f i l e n a m e 
 
             T I N Y : : E R R O R _ H A N D L E R . e x t r a c t _ p a t h s _ a u d i o ( p a t h ) 
 
         e n d 
 
     e n d 
 
     
 
     d e f   s e l f . m e _ p l a y ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         b e g i n 
 
             m e _ e r r o r _ c a t c h e r _ t i n y _ 9 1 1 2 ( f i l e n a m e ,   * a r g s ,   & b l o c k ) 
 
         r e s c u e 
 
             p a t h   =   f i l e n a m e 
 
             T I N Y : : E R R O R _ H A N D L E R . e x t r a c t _ p a t h s _ a u d i o ( p a t h ) 
 
         e n d 
 
     e n d 
 
     
 
 e n d   #   A u d i o 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 # Q%  %  * *   N e w   M o d u l e   E R R O R _ H A N D L E R 
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%= # 
 
 m o d u l e   T I N Y 
 
     m o d u l e   E R R O R _ H A N D L E R 
 
     
 
         L O G _ F I L E   =   T I N Y : : E R R O R _ H A N D L E R : : L O G _ N A M E   +   ' . t x t ' 
 
         @ e r r o r _ a u d i o   =   " " 
 
         @ e r r o r _ g r a p h i c   =   " " 
 
     
 
         d e f   s e l f . e x t r a c t _ p a t h s _ a u d i o ( p a t h ) 
 
             r e t u r n   i f   @ e r r o r _ a u d i o . i n c l u d e ? ( p a t h ) 
 
             m s g b o x _ p ( " A d d e d   a   m i s s i n g   A u d i o   t o   t h e   L o g - E r r o r   :   # { p a t h } " ) 
 
             @ e r r o r _ a u d i o   + =   p a t h   +   " \ n " 
 
             w r i t e _ l o g 
 
         e n d 
 
     
 
         d e f   s e l f . e x t r a c t _ p a t h s _ g r a p h i c ( p a t h ) 
 
             r e t u r n   i f   @ e r r o r _ g r a p h i c . i n c l u d e ? ( p a t h ) 
 
             m s g b o x _ p ( " A d d e d   a   m i s s i n g   G r a p h i c   t o   t h e   L o g - E r r o r   :   # { p a t h } " ) 
 
             @ e r r o r _ g r a p h i c   + =   p a t h   +   " \ n " 
 
             w r i t e _ l o g 
 
         e n d 
 
     
 
         d e f   s e l f . w r i t e _ l o g 
 
             f i l e   =   F i l e . o p e n ( L O G _ F I L E ,   " w " ) 
 
             f i l e . w r i t e ( " \ n - - - - - - - - - -   M I S S I N G / E R R O R   G R A P H I C S   - - - - - - - - - - \ n \ n " ) 
 
             f i l e . w r i t e ( @ e r r o r _ g r a p h i c ) 
 
             f i l e . w r i t e ( " \ n - - - - - - - - - -   M I S S I N G / E R R O R   A U D I O   - - - - - - - - - - \ n \ n " ) 
 
             f i l e . w r i t e ( @ e r r o r _ a u d i o ) 
 
             f i l e . c l o s e 
 
         e n d 
 
     
 
     e n d   #   E R R O R _ H A N D L E R 
 
 e n d   #   T I N Y 
 
 
 
 # T%P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%W%
 
 # `%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%%  E N D   O F   S C R I P T   %P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%c%
 
 # Z%P%= P%= P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%P%]%